package com.ztgf.commodity.api.client;

import com.ztgf.commodity.models.dto.CommodityCommitMsgDTO;
import com.ztgf.commodity.models.service.ICommodityCommitMsgService;
import com.ztgf.common.constant.Result;
import com.ztgf.common.enums.CodeEnum;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/commodityCommitMsgApi")
@Api(value = "CommodityCommitMsgApiController", tags = "商品上传修改提交数据表api接口")
public class CommodityCommitMsgApiController {

    @DubboReference
    private ICommodityCommitMsgService commodityCommitMsgService;

    @PostMapping(value = "/insert")
    @ApiOperation(value = "添加", notes = "添加")
    public Result<?> add(CommodityCommitMsgDTO dto) {
        commodityCommitMsgService.add(dto);
        return new Result<>(CodeEnum.SUCCESS);
    }
}
